<?php
namespace Modules\Book\Models;

use Core\Mvc\Collection;

class NodeBook extends Collection
{
    public $bid;
    public $toc;
    public function getChildren()
    {
        $query = array(
            'conditions' => [
                'parent' => $this->getId()
            ],
            'order' => 'weight',
        );
        $output = self::find($query);
        return $output;
    }
}
